<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let user = {
            name: "漩涡鸣人",
            age: 18,
            skill: ["螺旋丸", "影分身"]
        }

        let {name: uname, age: uage} = user
        console.log(uname, uage)//漩涡鸣人 18

        // 剩余运算符
        let {name, ...other} = user
        console.log(name, other);

        // 扩展
        let option = {
            ...other,
            eat: "大闸蟹"
        }
        console.log(option)
    </script>
</body>
</html>